package com.bajiao.entity.coupon;

import java.io.Serializable;
import java.util.Date;

import com.bajiao.common.aspect.annotation.Dict;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;

import javax.validation.constraints.NotNull;

/**
 * @Description: 优惠券表
 * @Author: FanJq
 * @Date:   2024-12-12
 * @Version: V1.0
 */
@Data
@TableName("tb_coupon")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="tb_coupon对象", description="优惠券表")
public class Coupon {

	/**主键*/
	@TableId(type = IdType.ID_WORKER_STR)
    @ApiModelProperty(value = "主键", required = true, position = 0)
	private String id;
	/**优惠券名称*/
	@Excel(name = "优惠券名称", width = 15)
    @ApiModelProperty(value = "优惠券名称", required = true, position = 10)
	private String title;
	/**范围 1-平台 2-商家专属*/
	@Excel(name = "范围 1-平台 2-商家专属", width = 15)
    @ApiModelProperty(value = "范围 1-平台 2-商家专属", required = true, position = 20)
	private Integer scope;
	/**类型 1-折扣券 2-抵扣券*/
	@Excel(name = "类型 1-折扣券 2-抵扣券", width = 15)
    @ApiModelProperty(value = "类型 1-折扣券 2-抵扣券", required = true, position = 30)
	private Integer type;
	/**面额*/
	@Excel(name = "面额", width = 15)
    @ApiModelProperty(value = "面额", required = true, position = 40)
	private java.math.BigDecimal quota;
	/**满#减*/
	@Excel(name = "满#减", width = 15)
    @ApiModelProperty(value = "满#减", required = true, position = 50)
	private java.math.BigDecimal meet;
	/**是否注册赠送 0-否 1-是*/
	@Excel(name = "领取方式 1-注册赠送 2-邀请奖励 3-购买", width = 15)
    @ApiModelProperty(value = "领取方式 1-注册赠送 2-邀请奖励 3-购买", required = true, position = 60)
	private Integer receiveWay;
	/**使用期限*/
	@Excel(name = "使用期限", width = 15)
    @ApiModelProperty(value = "使用期限", required = true, position = 70)
	private Integer days;
	/**所属店铺id*/
	@Excel(name = "所属店铺id", width = 15)
    @ApiModelProperty(value = "所属店铺id", required = true, position = 80)
	@Dict(dictTable = "tb_store", dicCode = "id", dicText = "title")
	private String storeId;
	/**创建时间*/
	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", required = true, position = 90)
	private Date createTime;
	/**更新时间*/
	@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间", required = true, position = 100)
	private Date updateTime;
	/**状态 0-不可用 1-可用*/
	@Excel(name = "状态 0-不可用 1-可用", width = 15)
    @ApiModelProperty(value = "状态 0-不可用 1-可用", required = true, position = 110)
	private Integer status;
	/**价格*/
	@Excel(name = "价格", width = 15)
    @ApiModelProperty(value = "价格", required = true, position = 120)
	private java.math.BigDecimal price;
	/**简介*/
	@Excel(name = "简介", width = 15)
    @ApiModelProperty(value = "简介", required = true, position = 130)
	private String intro;
	/**是否推荐 0-否 1-是*/
	@Excel(name = "是否推荐 0-否 1-是", width = 15)
    @ApiModelProperty(value = "是否推荐 0-否 1-是", required = true, position = 140)
	private Integer isRecommend;

	/**浏览量 */
	private Integer browse;
	/**数量 */
	@NotNull(message = "数量不能为空")
	private Integer count;

	private Date endTime;

	@TableField(exist = false)
	private Integer total;
}
